/**
 * value编码值转换成lable值
 * */

  export function layer7ValueToLabel (value){
        var label ='';
        switch (value) {
            case '1':label='HTTP'; break;
            case '2':label='WAP1.x'; break;
            case '3':label='WAP2.0'; break;
            case '4':label='SMTP'; break;
            case '5':label='POP3'; break;
            case '6':label='IMAP4'; break;
            case '7':label='FTP（包含动静态FTP）'; break;
            case '8':label='RTSP流媒体'; break;
            case '9':label='MMS彩信'; break;
            case '10':label='HTTPS'; break;

        }
        return label;
    }
export function layer4ValueToLabel (value){
    var label ='';
    switch (value) {
        case '50':label='UDP'; break;
        case '51':label='TCP'; break;


    }
    return label;
}

export function layer7LabelToValue (value){
    var label ='';
    switch (value) {
        case 'HTTP':label='1'; break;
        case 'WAP1.x':label='2'; break;
        case 'WAP2.0':label='3'; break;
        case 'SMTP':label='4'; break;
        case 'POP3':label='5'; break;
        case 'IMAP4':label='6'; break;
        case 'FTP（包含动静态FTP）':label='7'; break;
        case 'RTSP流媒体':label='8'; break;
        case 'MMS彩信':label='9'; break;
        case 'HTTPS':label='10'; break;
        default :label;
    }
    return label;
}
export function layer4LabelToValue (value){
    var label ='';
    switch (value) {
        case 'UDP':label='50'; break;
        case 'TCP':label='51'; break;
        default: label;

    }
    return label;
}

export function getRegionName(regionId){
    var regionName = '';
    switch(regionId){
        case "100008100000" : regionName = '中国';break;
        case "100008110000" :regionName = "北京";break;
        case "100008120000" :regionName = "天津";break;
        case "100008310000" :regionName = "上海";break;
        case "100008500000" :regionName = "重庆";break;
        case "100008130000" :regionName = "河北省";break;
        case "100008140000" :regionName = "山西省";break;
        case "100008210000" :regionName = "辽宁省";break;
        case "100008220000" :regionName = "吉林省";break;
        case "100008230000" :regionName = "黑龙江省";break;
        case "100008320000" :regionName = "江苏省";break;
        case "100008330000" :regionName = "浙江省";break;
        case "100008340000" :regionName = "安徽省";break;
        case "100008350000" :regionName = "福建省";break;
        case "100008360000" :regionName = "江西省";break;
        case "100008370000" :regionName = "山东省";break;
        case "100008410000" :regionName = "河南省";break;
        case "100008420000" :regionName = "湖北省";break;
        case "100008430000" :regionName = "湖南省";break;
        case "100008440000" :regionName = "广东省";break;
        case "100008460000" :regionName = "海南省";break;
        case "100008510000" :regionName = "四川省";break;
        case "100008520000" :regionName = "贵州省";break;
        case "100008530000" :regionName = "云南省";break;
        case "100008610000" :regionName = "陕西省";break;
        case "100008620000" :regionName = "甘肃省";break;
        case "100008630000" :regionName = "青海省";break;
        case "100008150000" :regionName = "内蒙古";break;
        case "100008450000" :regionName = "广西";break;
        case "100008540000" :regionName = "西藏";break;
        case "100008640000" :regionName = "宁夏";break;
        case "100008650000" :regionName = "新疆";break;
    }
    return regionName;
}
export function getRegionNbr(regionId){
    var regionNbr = '';
    switch(regionId){
        case "100008100000" : regionNbr = '8100000';break;
        case "100008110000" :regionNbr = "8110000";break;
        case "100008120000" :regionNbr = "8120000";break;
        case "100008310000" :regionNbr = "8310000";break;
        case "100008500000" :regionNbr = "8500000";break;
        case "100008130000" :regionNbr = "8130000";break;
        case "100008140000" :regionNbr = "8140000";break;
        case "100008210000" :regionNbr = "8210000";break;
        case "100008220000" :regionNbr = "8220000";break;
        case "100008230000" :regionNbr = "8230000";break;
        case "100008320000" :regionNbr = "8320000";break;
        case "100008330000" :regionNbr = "8330000";break;
        case "100008340000" :regionNbr = "8340000";break;
        case "100008350000" :regionNbr = "8350000";break;
        case "100008360000" :regionNbr = "8360000";break;
        case "100008370000" :regionNbr = "8370000";break;
        case "100008410000" :regionNbr = "8410000";break;
        case "100008420000" :regionNbr = "8420000";break;
        case "100008430000" :regionNbr = "8430000";break;
        case "100008440000" :regionNbr = "8440000";break;
        case "100008460000" :regionNbr = "8460000";break;
        case "100008510000" :regionNbr = "8510000";break;
        case "100008520000" :regionNbr = "8520000";break;
        case "100008530000" :regionNbr = "8530000";break;
        case "100008610000" :regionNbr = "8610000";break;
        case "100008620000" :regionNbr = "8620000";break;
        case "100008630000" :regionNbr = "8630000";break;
        case "100008150000" :regionNbr = "8150000";break;
        case "100008450000" :regionNbr = "8450000";break;
        case "100008540000" :regionNbr = "8540000";break;
        case "100008640000" :regionNbr = "8640000";break;
        case "100008650000" :regionNbr = "8650000";break;
    }
    return regionNbr;
}
